<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        /*relative和absolute时一起使用，找相对位置的*/
        .c1{
            background-color: grey;
            width: 500px;
            height: 300px;
            border: 1px;

            /*设置大框的边界*/
            position: relative;
        }
        .c2{
            width: 60px;
            height: 60px;
            background-color: blue;

            /*小框一大框为边界*/
            position: absolute;

            /*以大框为边界的相对位置*/
            top: 1px;
            right: 1px;
        }
    </style>
</head>
<body>
<div class="c1">
    <div class="c2"></div>
</div>
</body>
</html>